package com.javaee.javaee.service;

import com.javaee.javaee.bean.Cart;
import com.javaee.javaee.dao.CartMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CartService{
    @Resource
    private CartMapper cartMapper;

    public List<Cart> findAll(){
        return cartMapper.findAll();
    }

    public int add(Cart cart){
        return cartMapper.add(cart);
    }

    public int delete(int orderno){
        return cartMapper.delete(orderno);
    }

    public Cart select(int orderno){
        return cartMapper.select(orderno);
    }

    public Cart select2(String userno){
        return cartMapper.select2(userno);
    }

    public int update(Cart cart){
        return cartMapper.update(cart);
    }
}
